<template>
<!--  导航栏-->
  <div  style="height: 100100%;">

    <el-menu  unique-opened  background-color="#545c64" text-color="#fff"  active-text-color="#ffd04b" default-active="1-4-1" class="el-menu-vertical-demo left-menu" @open="handleOpen" @close="handleClose" :collapse="isCollapse"  style="padding-top: 120px;padding-bottom:120px">
      <el-submenu index="1">
        <template slot="title">
          <i class="icon-store tubiao" ></i>
          <span slot="title">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;销售管理</span>
        </template>
          <router-link :to="{name:'PingBanSale'}"><el-menu-item index="1-1">平板销售（手写）</el-menu-item></router-link>
        <router-link :to="{name:'JuanBanSale'}"> <el-menu-item index="1-2">卷板销售（手写）</el-menu-item></router-link>
         <router-link :to="{name:'OtherProductsSale'}"><el-menu-item index="1-3">其他产品销售（手写）</el-menu-item></router-link>
        <router-link :to="{name:'FindSaleRecording'}"> <el-menu-item index="1-4">销售查询/收款</el-menu-item></router-link>
      </el-submenu>

      <el-submenu index="2">
        <template slot="title">
          <i class="icon-yly_jiagong tubiao"></i>
          <span slot="title">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;开平管理</span>
        </template>
        <router-link :to="{name:'KaiPingMsg'}"><el-menu-item index="2-1">添加开平信息</el-menu-item></router-link>
        <router-link :to="{name:'FindKaiPingRecording'}"><el-menu-item index="2-2">开平查询/付款</el-menu-item></router-link>
        <router-link :to="{name:'KaiPingGuyManage'}"><el-menu-item index="2-3">开平厂家管理</el-menu-item></router-link>
        <router-link :to="{name:'KaiPingComparison'}"><el-menu-item index="2-4">开平产品对照表</el-menu-item></router-link>
      </el-submenu>
      <el-submenu index="3">
        <template slot="title">
          <i class="icon-caigou tubiao"></i>
          <span slot="title">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;采购管理</span>
        </template>
        <router-link :to="{name:'PingBanBuy'}"><el-menu-item index="3-1">平板采购（手写）</el-menu-item></router-link>
        <router-link :to="{name:'JuanBanBuy'}"><el-menu-item index="3-2">卷板采购（手写）</el-menu-item></router-link>
        <router-link :to="{name:'OtherProductsBuy'}"><el-menu-item index="3-3">其他产品采购（手写）</el-menu-item></router-link>
        <el-menu-item disabled index="3-4">新型号录入</el-menu-item>
        <router-link :to="{name:'FindBuyRecording'}"><el-menu-item index="3-5">采购查询/付款</el-menu-item></router-link>
        <router-link :to="{name: 'SuppliersManage'}"><el-menu-item index="3-6">供应商管理</el-menu-item></router-link>
      </el-submenu>
      <el-submenu index="4" >
        <template slot="title">
          <i class="icon-cangku tubiao" ></i>
          <span slot="title">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;库存管理</span>
        </template>
        <router-link :to="{name:'InventoryRecording'}" > <el-menu-item index="4-1">库存查询</el-menu-item></router-link>
        <router-link :to="{name:'InventoryRecordingByDaiGang'}"><el-menu-item index="4-2">带钢库存统计</el-menu-item></router-link>
        <router-link :to="{name:'InventoryRecordingByPingBan'}"><el-menu-item index="4-3">平板库存统计</el-menu-item></router-link>
        <el-menu-item disabled index="4-4">销售出库查询</el-menu-item>
        <el-menu-item disabled index="4-5">盘点记录</el-menu-item>
        <el-menu-item disabled index="4-6">库存盘点</el-menu-item>
      </el-submenu>
      <el-submenu index="5">
        <template slot="title">
          <i class="icon-kehu tubiao"></i>
          <span slot="title">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;客户管理</span>
        </template>
        <router-link :to="{name:'ClientRegistered'}"><el-menu-item index="5-1">添加客户</el-menu-item></router-link>
        <router-link :to="{name:'ClientManage'}"><el-menu-item index="5-2">客户管理</el-menu-item></router-link>
        <router-link :to="{name:'ClientGroupMsg'}"><el-menu-item index="5-3">客户组管理</el-menu-item></router-link>
        <el-menu-item disabled index="5-4">积分兑换记录</el-menu-item>
      </el-submenu>
      <el-submenu index="6">
        <template slot="title">
          <i class="icon-xitong tubiao"></i>
          <span slot="title">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;系统管理</span>
        </template>
        <router-link :to="{name:'BasicDataChange'}" ><el-menu-item index="6-1">基本信息设置</el-menu-item></router-link>
      <router-link :to="{name:'EmployeeShow'}" > <el-menu-item index="6-2">员工管理</el-menu-item></router-link>
       <router-link :to="{name:'DepartmentShow'}"><el-menu-item index="6-3">员工部门管理</el-menu-item></router-link>
        <router-link :to="{name:'WarehouseShow'}"> <el-menu-item index="6-4">仓库管理</el-menu-item></router-link>
        <router-link :to="{name:'ProductBigTypeShow'}"> <el-menu-item index="6-5">产品大类管理</el-menu-item></router-link>
        <router-link :to="{name:'ProductSmallTypeShow'}"> <el-menu-item index="6-6">产品小类管理</el-menu-item></router-link>
        <router-link :to="{name:'UnitShow'}"><el-menu-item index="6-7">计量单位管理</el-menu-item></router-link>
        <el-menu-item disabled index="6-8">数据备份</el-menu-item>
        <el-menu-item disabled index="6-9">数据还原</el-menu-item>
        <el-menu-item index="6-10">系统登陆日志</el-menu-item>
      </el-submenu>
      <el-submenu index="7">
        <template slot="title">
          <i class="icon-zhanghuyue tubiao"></i>
          <span slot="title">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;账务管理</span>
      </template>
        <router-link :to="{name:'CompanyAccount'}" >   <el-menu-item index="7-1">公司账务资金统计</el-menu-item></router-link>
        <router-link :to="{name:'AccountBigType'}"> <el-menu-item index="7-2">账务大类</el-menu-item></router-link>
        <router-link :to="{name:'AccountSmallType'}"><el-menu-item index="7-11">账务小类</el-menu-item></router-link>
        <router-link :to="{name:'AddAccount'}"><el-menu-item index="7-3">添加账务</el-menu-item></router-link>
      <router-link :to="{name:'FindAccountRecording'}">  <el-menu-item index="7-4">账务查询</el-menu-item></router-link>
       <router-link :to="{name:'ClientTiaoPiaoAndReconciliation'}"> <el-menu-item index="7-5">客户调账/调票</el-menu-item></router-link>
       <router-link :to="{name:'SuppliersTiaoPiaoAndReconciliation'}"> <el-menu-item index="7-6">供应商调账/调票</el-menu-item></router-link>
       <router-link :to="{name:'KaiPingGuyTiaoPiaoAndReconciliation'}"><el-menu-item index="7-11">开平厂家调账/调票</el-menu-item></router-link>
        <router-link :to="{name:'FindReconciliationRecording'}"><el-menu-item index="7-7">调账记录</el-menu-item></router-link>
        <router-link :to="{name:'FindTiaoPiaoRecording'}"><el-menu-item index="7-12">调票记录</el-menu-item></router-link>
        <el-menu-item disabled index="7-8">数据备份</el-menu-item>
       <router-link :to="{name:'FindInvoiceRecording'}"><el-menu-item index="7-9">开票记录查询</el-menu-item></router-link>
        <el-menu-item disabled index="7-10">采购/销售冲抵</el-menu-item>
      </el-submenu>

    </el-menu>
  </div>
</template>

<script>
import bus from "../utils/Bus";
export default {
  name: "SideMenu",
  data() {
    return {
      isCollapse: false
    };
  },
  created() {
      bus.$on('chuanzhi',msg=>{
        this.isCollapse=msg
      })
    },
  methods: {

    handleOpen(key, keyPath) {

    },
    handleClose(key, keyPath) {

    }
  }
}
</script>

<style scoped>
a{
  text-decoration: none;
}
.tubiao{
  color: white;
}
.left-menu{
  /*height: 100%;*/
  /*overflow: visible;*/
  /*margin-bottom: 100px;*/
  /*position: fixed;*/
  /*overflow-y: scroll;*/
}
.el-menu-vertical-demo:not(.el-menu--collapse) {
  width: 220px;
  /*height: 100%;*/
  /*min-height: 450px;*/
  /*height: 100%;*/
  /*max-height: 2000px;*/
overflow-style: auto;
  overflow-y: scroll;
  /*overflow-x: hidden;*/
  height:450px;
  min-height: 450px;
  max-height: 2000px;
}
.el-menu--collapse{
  min-height: 450px;
  max-height: 2000px;

  /*height: 100%;*/
}
</style>
